﻿Imports Fgv.Framework.UI
Imports LS.Leilao.Dominio

Partial Class InterfaceRica_AdminUsuarios
    Inherits BasePage

#Region "Atributos da pagina"

#End Region

#Region "Delegates"

    Protected Delegate Sub PageDelegate()

#End Region

#Region "Classes Injetadas"

#End Region

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Not IsPostBack Then
            Me.DataBindGadjets()
        End If

        Dim _delegateOnSelecionarPessoa As PageDelegate = New PageDelegate(AddressOf Me.ProcessarAoSelecionarPessoa)
        p1.OnPessoaSelected = _delegateOnSelecionarPessoa

    End Sub


    Protected Sub ProcessarAoSelecionarPessoa()

        Dim _pessoa As Pessoa
        _pessoa = p1.PessoaSelecionada
        u1.PessoaSelecionada = _pessoa
        p3.PessoaSelecionada = _pessoa
        p3.Visible = True
        u1.Visible = True
        p3.DataBindVisaoCadastro()
        t1.ActiveTab = tb2

        If _pessoa.Usuario IsNot Nothing Then
            pcUsu1.Proprietario = _pessoa.Usuario
            tb3.Visible = True
            tb4.Visible = True
        Else
            pcUsu1.Proprietario = Nothing
            tb3.Visible = False
            tb4.Visible = False
        End If

    End Sub

#Region "Funcoes de Databind"

    Protected Sub DataBindGadjets()

        Dim _strings() As String = {"a", "", "", "", ""}

        rpt2.DataSource = _strings
        rpt2.DataBind()

    End Sub

#End Region

#Region "Operacoes do Usuario"

#End Region

#Region "Classes Auxiliares"

#End Region

    Protected Sub btTeste_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btTeste.Click
        md1.Show()
    End Sub
End Class
